<?php
namespace app\baseinfo\controller;

class Agents extends \app\common\controller\Base {
	protected $modelname='Agent';

	protected function _index(){
		$condition=[];
		$param=$this->param;
    $userInfo=$GLOBALS['userInfo'];
    $sid = $userInfo['site_id'];
    if ($sid) {
      $condition[] = ['site_id', '=', $sid];
    }

		if (isset($param['serial_number']))
		$condition[]=['serial_number','like',"%".$param['serial_number']."%"];

		return $condition;
	}
}

?>